using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace GameShow
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread] 
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //GameShow.DAL.Database.ConnectionString = global::GameShow.Properties.Settings.Default.Connection;
            Forms.frmBase frm = null;
            switch (global::GameShow.Properties.Settings.Default.ClientType)
            {
                case Common.ClientType.Control:
                    frm = new Forms.frmControl();
                    Application.Run(frm);
                    break;
                case Common.ClientType.Slide:
                    try
                    {
                        frm = new Forms.frmPlayer00(-1);
                        frm.FormBorderStyle = FormBorderStyle.None;
                        AppInstance.SetStartForm(frm);
                        Application.Run(frm);
                    }
                    catch(Exception ex)
                    {
                        DisplayMessage.ShowError(ex.Message);
                    }
                    break;
                default:
                    try
                    {
                        frm = new Forms.frmPlayer00(-1);
                        frm.FormBorderStyle = FormBorderStyle.Sizable;
                        AppInstance.SetStartForm(frm);
                        Application.Run(frm);
                    }
                    catch(Exception ex)
                    {
                        DisplayMessage.ShowError(ex.Message);
                    }
                    break;
            }

            //Application.Run(new Form1());
            //Application.Run(frm);
        }
    }
}